package com.rc.saas.tenant.service.hlhtsk;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.base.BaseSearch;
import com.rc.saas.tenant.mapper.hlhtsk.HlhtskGovtOperatorMapper;
import com.rc.saas.tenant.model.hlhtsk.HlhtskGovtOperator;
import com.rc.saas.tenant.model.hlhtsk.HlhtskGovtOperatorExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author frog
 * @date 2021/4/20
 */
@Service
public class HlhtskGovtOperatorServiceImpl implements HlhtskGovtOperatorService {

    @Autowired
    private HlhtskGovtOperatorMapper hlhtskGovtOperatorMapper;

    @Override
    public HlhtskGovtOperatorMapper getMapper() {
        return hlhtskGovtOperatorMapper;
    }

    @Override
    public PageInfo<HlhtskGovtOperator> listPageHlhtskGovtOperator(BaseSearch baseSearch) {
        PageHelper.startPage(baseSearch.getOffset(), baseSearch.getLimit());
        HlhtskGovtOperatorExample example = new HlhtskGovtOperatorExample();
        List<HlhtskGovtOperator> hlhtskGovtOperators = hlhtskGovtOperatorMapper.selectByExample(example);
        return new PageInfo<HlhtskGovtOperator>(hlhtskGovtOperators);
    }


}
